document.write("<script src='/static/common/js/HttpUtils.js'></script>");
/*
	网络请求路径
*/
var Api={
	'login':function(url,data,callback){
		return HttpUtils.post(url,data,function(res){
			callback(res);
		});
	},
	'houseClear':function(url,data,callback){
		return HttpUtils.post(url,data,function(res){
			if(res.code==200){
				//var index = parent.layer.getFrameIndex(window.name);
				layui.table.reload("think-table");
				//parent.layer.close(index);
			}
			callback(res);
		});
	},
	'edit':function(data,callback){
		return HttpUtils.post("",data,function(res){
			if(res.code==200){
		        var index = parent.layer.getFrameIndex(window.name);
		        parent.layui.table.reload("think-table");
		        parent.layer.close(index);
		      }
			callback(res);
		});
	},
	'add':function(url,data,callback){
		return HttpUtils.post(url,data,function(res){
			if(res.code==200){
		        var index = parent.layer.getFrameIndex(window.name);
		        parent.layui.table.reload("think-table");
		        parent.layer.close(index);
		      }
			callback(res);
		});
	},
	"del":function(id,callback,url){
		return HttpUtils.get(url,{"id":id},function(res){

			callback(res);
		});
	},
	"lock_update":function(id,callback){
		return HttpUtils.get("lockUpdate",{"id":id},function(res){

			callback(res);
		});
	},
};
